if [ $# -ne 2 ]
then
   echo "Usage : win_cmd.sh user@ip_addr batch_file"
   echo "Sample : win_cmd.sh core@192.168.141.111 'c:\\\\bin\\\\sample.bat'"
   exit 8
fi
export LANG=zh_CN.gbk
expect <<EOF
set timeout -1
spawn ssh $1 "cmd /c $2"
expect eof
catch wait result
exit [lindex \$result 3]
EOF
